<div class="page-group">
    <div class="page page-current ">

        <header class="bar bar-nav theme-red">
            <a class="icon icon-me pull-left open-panel" data-panel="#panel-left-user"></a>
            <h1 class="title">我的红包</h1>
        </header>

        <nav class="bar bar-tab theme-red">
            <a class="tab-item active" href="#">
                <span class="icon iconfont icon-bank"></span>
                <span class="tab-label">我发的红包</span>
            </a>
            <a class="tab-item" href="/envelope/sending" data-no-cache="true">
                <span class="icon iconfont icon-redenvelope"></span>
                <span class="tab-label">发红包</span>
            </a>
            <a class="tab-item" href="/envelope/rev/home" data-no-cache="true">
                <span class="icon iconfont  icon-redenvelope-fill"></span>
                <span class="tab-label">抢红包</span>
            </a>
            <a class="tab-item" href="/envelope/recvd/list" data-no-cache="true">
                <span class="icon iconfont  icon-unorderedlist"></span>
                <span class="tab-label">抢到的红包</span>
            </a>
        </nav>
        <div class="content">
            <div class="content-block-title">我发的红包列表</div>

            <div class="list-block">
                <ul>
                    {{range .orders}}
                        <li>
                            <a class="item-content item-link" href="/envelope/details?id={{.EnvelopeNo}}"
                               data-no-cache="true">
                                <div class="item-media"><i class="icon icon-f7"></i></div>
                                <div class="item-inner">
                                    <div class="item-title">
                                        <div>{{if eq .EnvelopeType 1  }}普通红包{{else}}碰运气红包{{end}}</div>
                                        <div class="date"> {{.CreatedAt.Format $.format}}</div>
                                    </div>
                                    <div class="item-after">
                                        <div>{{.Amount}}
                                            <div class="small_msg">总金额（剩余{{.RemainQuantity}}个/共{{.Quantity}}个）</div>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </li>
                    {{end}}


                </ul>
            </div>

        </div>

    </div>
</div>

<div class="panel-overlay"></div>
<!-- Left Panel with Reveal effect -->
<div class="panel panel-left panel-reveal theme-dark" id='panel-left-user'>
    <div class="content-block">
        <p><a href="#" class="confirm-logout">退出</a></p>
        <p><a href="#" class="close-panel">关闭</a></p>
    </div>
    <div class="list-block">
        <!-- .... -->
    </div>
</div>
<script type="text/javascript">
    $(document).on('click', '.confirm-logout', function () {
        $.confirm('你确定要登出吗?', function () {
            // document.cookie = ""

            window.location = "/logout";

        });
    });
</script>